﻿if exists (select * from dbo.sysobjects where name = 'sp_tb_Payment_GetByServiceId')
	drop procedure [dbo].[sp_tb_Payment_GetByServiceId]
Go 
CREATE PROCEDURE dbo.sp_tb_Payment_GetByServiceId
@ServiceId int
AS
	SELECT * FROM tb_Payment
 WHERE ServiceId = @ServiceId 
Goif exists (select * from dbo.sysobjects where name = 'sp_tb_Payment_GetByUserId')
	drop procedure [dbo].[sp_tb_Payment_GetByUserId]
Go 
CREATE PROCEDURE dbo.sp_tb_Payment_GetByUserId
@UserId varchar(50)
AS
	SELECT * FROM tb_Payment
 WHERE UserId = @UserId 
Go